package com.ruoyi.gather.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.gather.api.domain.ErpCollectProductSku;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(contextId = "remoteCollectProductSkuPropertyService", value = ServiceNameConstants.GATHER_SERVICE)
public interface RemoteCollectProductSkuPropertyService {

    /**
     * @Description: 根据属性值，获取属性ID，查询不到，则新增后返回
     * @Author: j.zh
     * @Date: 2024/6/12
     * @param type
     * @param value
     * @return
     * @Version: 4.0.0
    **/
    @GetMapping("/gather/collectProductSkuProperty/getValueById/{type}/{value}")
    String getValueById(@PathVariable("type") String type, @PathVariable("value") String value);

    /**
     * @Description: 每次调用该方法，将sku属性和值全部放入缓存中，P开头为属性名，PV开头为属性值
     * @Author: j.zh
     * @Date: 2024/6/14
     * @return
     * @Version: 4.0.0
    **/
    @GetMapping("/gather/collectProductSkuProperty/getValueList")
    R<Void> getValueList();

}
